##
##
##
NAME			=	serveur

SRCS    		=	action.c		\
				action_avance.c		\
				action_broadcast.c	\
				action_connect.c	\
				action_elevation.c	\
				action_expulse.c	\
				action_fork.c		\
				action_gauche_droite.c	\
				action_inventaire.c	\
				action_prend_pose.c	\
				action_voir.c		\
				calcul_coord.c		\
				clean_server.c		\
				communication.c		\
				creation.c		\
				drone.c			\
				egg.c			\
				endgame.c		\
				graph_action1.c		\
				graph_action2.c		\
				graph_action3.c		\
				loop.c			\
				main.c			\
				map.c			\
				parse_action.c		\
				parse_option.c		\
				string_list.c		\
				str_to_wordtab.c	\
				timer.c			\
				x_error.c		\

OBJS			=	$(SRCS:.c=.o)


CC			=	gcc
RM			=	rm -f
CFLAGS			=	-W -Wall -ggdb3


$(NAME)	:		$(OBJS)
			@$(CC) $(OBJS) -o $(NAME) -lm
			@printf "\n \033[33m[Message]\033[39m Compilation done\n\n"

.c.o	:
			@$(CC) $(CFLAGS) -c $< -o $@
			@printf " \033[34m[Compilation]\033[39m %s\n" $<

re	:		fclean all

all	:		$(NAME)

clean	:
			@$(RM) *~ *.o
			@printf " \033[31m[Delete] \033[39m%s\n" $(OBJS)

fclean	:		clean
			@$(RM) $(NAME)
			@printf "\n \033[31m[Delete] \033[39m%s\n\n" $(NAME)
